# -*- coding: UTF-8 -*-
'''
@Project ：pythonProject 
@File    ：setDemo3.py
@Author  ：siwei
@Date    ：2023/10/16 22:02 
@other   ：str.print---->print(str)
'''
# 集合的增删改:
set1 = {1, 2, 3, 4, 5, 6}
# 增:add()单个
set1.add(7)
print(set1)
# 删:remove()单个、clear()清空
set1.remove(7)
print(set1)
set1.clear()
print(set1)
# 改:update()
set1.update(['J','Q','K'])
print(set1)